<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .color{
            color: red;
            font-size: 30px;
        }
        .bg{
            background-color: yellow;
        }
        #mydiv{
            color: blue;
        }
        #imgDiv img{
            width: 200px;
            height: 200px;
            opacity: 0.3;
        }
        #imgDiv img:hover{
            opacity: 1;
            border-radius: 100px;
        }


        #testDiv *{
            color: brown;
            background-color: aqua;
        }
        input[type=password]{
            background-color: yellow;
        }

        #colorDiv{
            color: darkmagenta !important;
        }

        #dialogDiv{
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0px;
            top: 0px;
            background-color: rgba(255,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            visibility: hidden;
        }

        #contentDiv{
            width: 500px;
            height: 300px;
            background-color: white;
            border: 2px solid #000;
        }
    </style>

    <script>
        function showDiv(){
            let divObj = document.getElementById("dialogDiv");
            divObj.style.visibility = "visible";
        }
        function closeDiv(){
            let divObj = document.getElementById("dialogDiv");
            divObj.style.visibility = "hidden";
        }
    </script>
</head>
<body>
    <div>dddd</div>
    <div class="color bg">bb</div>
    <div id="mydiv">mydiv</div>
    <span class="color">span内容</span>
    
    <div id="imgDiv">
        <img src="../img/1.jpg">
        <img src="../img/15.jpg">
        <img src="../img/3.jpg">
    </div>

    <div id="testDiv">
        <p>段落</p>
        <span>span</span>
    </div>

    <input type="text"><br>
    <input type="password"><br>
    <input type="password"><br>

    <div id="colorDiv" style="color: red">divtest</div>
    <input type="button" value="添加" onclick="showDiv()">

    <div id="dialogDiv">
        <div id="contentDiv">
            用户名:<input type="text"><br>
            <input type="button" value="提交" onclick="closeDiv()">
        </div>
    </div>
</body>
</html>